package com.mmd.admin.model.pojo.request;

import com.mmd.base.annotation.valid.group.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@ApiModel("支付配置编辑参数")
public class CrmPaySetEditParam {
    @ApiModelProperty("id")
    @NotNull(message = "支付配置id不能为空", groups = {ValidGroup.Update.class})
    private Long id;

    @ApiModelProperty(value = "1元等于多少积分")
    @NotNull(message = "1元等多少积分不能为空", groups = {ValidGroup.Update.class})
    @DecimalMin(value = "0.01", message = "1元等于多少积分 最小0.01")
    private BigDecimal conversion;

    @ApiModelProperty(value = "商品金额可以使用多少比例的积分")
    @NotNull(message = "商品金额可以使用多少比例的积分不能为空", groups = {ValidGroup.Update.class})
    @DecimalMin(value = "0", message = "商品金额可以使用多少比例的积分 最小0")
    @DecimalMax(value = "0.99", message = "商品金额可以使用多少比例的积分 最大0.99")
    private BigDecimal ratio;

    @ApiModelProperty("每天限制支付笔数")
    @NotNull(message = "每天限制支付笔数不能为空", groups = {ValidGroup.Update.class})
    private Integer astrictPayNum;

    @ApiModelProperty("每天限制支付金额")
    @NotNull(message = "每每天限制支付金额不能为空", groups = {ValidGroup.Update.class})
    private BigDecimal astrictMoney;


    @ApiModelProperty("折扣比例小 ")
    @NotNull(message = "折扣比例不能为空", groups = {ValidGroup.Update.class})
    @DecimalMin(value = "0.01",message = "折扣比例最小0.01", groups = {ValidGroup.Update.class})
    @DecimalMax(value = "1",message = "折扣比例最大1", groups = {ValidGroup.Update.class})
    private BigDecimal discountRatioMin;

    @ApiModelProperty("折扣比例大 ")
    @NotNull(message = "折扣比例大不能为空", groups = {ValidGroup.Update.class})
    @DecimalMin(value = "0.01",message = "折扣比例最小0.01", groups = {ValidGroup.Update.class})
    @DecimalMax(value = "1",message = "折扣比例最大1", groups = {ValidGroup.Update.class})
    private BigDecimal discountRatioMax;


}
